|
Download
FAQ History |
|
API
Search Feedback |
The Example JSP Pages
This chapter illustrates JSP scripting elements using a version of the
hello2example introduced in Chapter 3--webclient--that accesses a Web service. To build, package, deploy, and run thewebclientexample:
- Build and deploy the JAX-RPC Web service
MyHelloServicedescribed in Creating a Web Service with JAX-RPC.- In a terminal window, go to
<INSTALL>/j2eetutorial14/examples/jaxrpc/webclient/.- Run
asantbuild. This target copies the JSP pages to the<INSTALL>/j2eetutorial14/examples/jaxrpc/webclient/build/directory and runswscompileto generate the JAX-RPC client stubs.- Start
deploytool.- Create a Web application called
webclientby running the New Web Application Wizard. Select FileNew
Web Application WAR.
- New Web Application Wizard
- Select the Create New Stand-Alone WAR Module radio button.
- Click Browse and in the file chooser, navigate to
<INSTALL>/j2eetutorial14/examples/jaxrpc/webclient/.- In the File Name field, enter
webclient.- Click Choose Module File.
- In the WAR Display Name field enter
webclient.- In the Context Root field, enter
/webclient.- Click Edit to add the content files.
- In the Edit Contents dialog, navigate to
<INSTALL>/j2eetutorial14/examples/jaxrpc/webclient/build/. Selectduke.waving.gif,greeting.jsp,response.jsp, and thewebclientdirectory and click Add.- Click OK.
- Click Next.
- Select the JSP radio button.
- Click Next.
- Select
greeting.jspfrom the Servlet Class combo box.- Click Finish.
- Add an alias to the greeting Web component.
- Select File
Save.
- Deploy the WAR.
- Open your browser to
http://localhost:1024/webclient/greeting
|
Download
FAQ History |
|
API
Search Feedback |
All of the material in The J2EE 1.4 Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.